
#include "Idle.h"
#include "Weapon.h"

State* Idle::instance=0;

Idle::Idle(vector<Image*> img) : State(img)
{
    maxFrame=1;
}

State* Idle::getInstance()
{
    if(instance==0)
    {
        vector<Image*> img;
        Image* im = new Image("./Images/props.bmp");
        im->load();
        img.push_back(im);

        instance = new Idle(img);
    }

    return instance;
}

 void Idle::moveLeft(Entity* player)
{
    player->setCurrentMoveSpeedX(-10);
    player->setState(PlayerMoveLeft::getInstance());
}

 void Idle::moveRight(Entity* player)
{
    player->setCurrentMoveSpeedX(10);
    player->setState(PlayerMoveRight::getInstance());
}

void Idle::shoot(Entity* player)
{
    ( (Weapon*)player->getWeaponClip()->getclippedToMe()->getOwner())->shoot(1,0);
}



